﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityGameFramework.Runtime;

namespace Client.UI {
    public class StartGameDialog : UGuiForm {
        /// <summary>
        /// 状态对象
        /// </summary>
        private ProcedureMain m_ProcedureMain;
        protected override void OnOpen(object userData) {
            base.OnOpen(userData);
            m_ProcedureMain = (ProcedureMain) userData;
            if (m_ProcedureMain == null) {
                Log.Warning("ProceDureMain is Invaild when open StartGameDialog!");
                return;
            }

            InitInfo();
        }

        protected override void OnClose(bool isShutdown, object userData) {
            base.OnClose(isShutdown, userData);
            m_ProcedureMain = null;
        }

        private void InitInfo() {
            
        }

        public void OnClickStartGame() {
            m_ProcedureMain.StartGame();
        }
    }
}
